"use strict"

/**
 * 广西壮族政府采购网爬虫
 *  
 */

var Base = require("./base");
var gx_spider = new Base();
gx_spider.name = "广西壮族采购网";

gx_spider.getPageUrl = function (pg) {
    return "http://www.gxzfcg.gov.cn/CmsNewsController/getCmsNewsList/channelCode-shengji_cggg/param_bulletin/20/page_" + pg + ".html";
};

gx_spider.getItems = function ($) {
    var items = [];
    $(".infoLink ul li a").each(function (index, ele) {
        var e = $(ele);
        var item = {};
        item.title = e.text();
        item.url = "http://www.gxzfcg.gov.cn" + e.attr("href");
        item.source = gx_spider.name;
        items.push(item);
    });
    return items;
};

exports = module.exports = gx_spider;